<?php
$criteria=new CDbCriteria;
$criteria->condition='`t`.`status` > -1 AND `t`.`pid` = 0 AND `t`.`open`=1 AND `t`.`view`=1 AND (`t`.`post_uid`=:post_uid OR `t`.`to_uid`=:to_uid)';
$criteria->with=array('post_user','to_user');
$criteria->params=array(':post_uid'=>$user_info->id, ':to_uid'=>$user_info->id,);

$dataProvider=new CActiveDataProvider('Message',array(
    'criteria'=>$criteria,
    'pagination'=>array(
        'pageSize'=>20,
    ),
));

$session=new CHttpSession();
$session->open();
$session['i']=1;

?>

<div class="detailContent22 wp" style="min-height: 1335px">
    <table width="100%" cellspacing="0" cellpadding="0" border="0" class="table3 paddingbotton80 ">
        <tbody><tr>
            <th width="10%" bgcolor="#efefef" align="center" class="th1">信息ID</th>
            <th width="35%" bgcolor="#efefef" class="th1">标题</th>
            <th width="10%" bgcolor="#efefef" class="th1">消息状态</th>
            <th width="10%" bgcolor="#efefef" align="center" class="th1">消息类型</th>
            <th width="20%" bgcolor="#efefef" align="center">操作指令</th>
        </tr>

        <?php
        if(!empty($dataProvider->data))
            $this->widget('zii.widgets.CListView', array(
                'dataProvider'=>$dataProvider,
                'itemView'=>'_message',
                'ajaxUpdate'=>false,
                'template'=>"{items}\n{pager}",
//        'itemsTagName'=>'ul',
//        'itemsCssClass'=>'tb',
            ));
        ?>
        </tbody></table>
</div>